package proj2501.image_viewer;

import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;

public class IVMenuBar extends JMenuBar {
	private P013ImageViewer frame;
	private JMenu fileMenu;
	
	public IVMenuBar(P013ImageViewer frame) {
		this.frame = frame;
		
		fileMenu = new FileMenu();
		add(fileMenu);
	}
	
	private class FileMenu extends JMenu {
		public FileMenu() {
			super("File");
			
			JMenuItem openDialogItem = new JMenuItem();
			openDialogItem.setAction(frame.openDialogAction);
			add(openDialogItem);
			
			JMenuItem quitItem = new JMenuItem();
			quitItem.setAction(frame.closeAction);
			add(quitItem);
		}
	}
}
